home *** CD-ROM | disk | FTP | other *** search
Emacs Compiled Lisp | 1994-06-23 | 2.5 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Emacs Compiled Lisp
(other/emacsCompiledLisp).
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| Emacs Compiled Lisp (other/emacsCompiledLisp)
| magic
| Unsupported |
100%
| file
| Emacs/XEmacs v19 byte-compiled Lisp data
| default
| |
99%
| file
| data
| default
| |
100%
| TrID
| Emacs/XEmacs byte-compiled Lisp (generic)
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 13 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 72 6f 6c 61 6e 64 40 |piled by| roland@|
|00000020| 63 68 75 72 63 68 79 2e | 67 6e 75 2e 61 69 2e 6d |churchy.|gnu.ai.m|
|00000030| 69 74 2e 65 64 75 20 6f | 6e 20 54 68 75 20 4a 75 |it.edu o|n Thu Ju|
|00000040| 6e 20 32 33 20 32 30 3a | 35 39 3a 35 36 20 31 39 |n 23 20:|59:56 19|
|00000050| 39 34 0a 3b 3b 3b 20 66 | 72 6f 6d 20 66 69 6c 65 |94.;;; f|rom file|
|00000060| 20 2f 67 64 2f 67 6e 75 | 2f 65 6d 61 63 73 2f 31 | /gd/gnu|/emacs/1|
|00000070| 39 2e 30 2f 6c 69 73 70 | 2f 72 69 6e 67 2e 65 6c |9.0/lisp|/ring.el|
|00000080| 0a 3b 3b 3b 20 65 6d 61 | 63 73 20 76 65 72 73 69 |.;;; ema|cs versi|
|00000090| 6f 6e 20 31 39 2e 32 35 | 2e 31 33 2e 0a 3b 3b 3b |on 19.25|.13..;;;|
|000000a0| 20 62 79 74 65 63 6f 6d | 70 20 76 65 72 73 69 6f | bytecom|p versio|
|000000b0| 6e 20 46 53 46 20 32 2e | 31 30 0a 3b 3b 3b 20 6f |n FSF 2.|10.;;; o|
|000000c0| 70 74 69 6d 69 7a 61 74 | 69 6f 6e 20 69 73 20 6f |ptimizat|ion is o|
|000000d0| 6e 2e 0a 3b 3b 3b 20 74 | 68 69 73 20 66 69 6c 65 |n..;;; t|his file|
|000000e0| 20 75 73 65 73 20 6f 70 | 63 6f 64 65 73 20 77 68 | uses op|codes wh|
|000000f0| 69 63 68 20 64 6f 20 6e | 6f 74 20 65 78 69 73 74 |ich do n|ot exist|
|00000100| 20 69 6e 20 45 6d 61 63 | 73 20 31 38 2e 0a 0a 28 | in Emac|s 18...(|
|00000110| 69 66 20 28 61 6e 64 20 | 28 62 6f 75 6e 64 70 20 |if (and |(boundp |
|00000120| 27 65 6d 61 63 73 2d 76 | 65 72 73 69 6f 6e 29 0a |'emacs-v|ersion).|
|00000130| 09 20 28 6f 72 20 28 61 | 6e 64 20 28 62 6f 75 6e |. (or (a|nd (boun|
|00000140| 64 70 20 27 65 70 6f 63 | 68 3a 3a 76 65 72 73 69 |dp 'epoc|h::versi|
|00000150| 6f 6e 29 20 65 70 6f 63 | 68 3a 3a 76 65 72 73 69 |on) epoc|h::versi|
|00000160| 6f 6e 29 0a 09 20 20 20 | 20 20 28 73 74 72 69 6e |on).. | (strin|
|00000170| 67 2d 6c 65 73 73 70 20 | 65 6d 61 63 73 2d 76 65 |g-lessp |emacs-ve|
|00000180| 72 73 69 6f 6e 20 22 31 | 39 22 29 29 29 0a 20 20 |rsion "1|9"))). |
|00000190| 20 20 28 65 72 72 6f 72 | 20 22 60 2f 67 64 2f 67 | (error| "`/gd/g|
|000001a0| 6e 75 2f 65 6d 61 63 73 | 2f 31 39 2e 30 2f 6c 69 |nu/emacs|/19.0/li|
|000001b0| 73 70 2f 72 69 6e 67 2e | 65 6c 27 20 77 61 73 20 |sp/ring.|el' was |
|000001c0| 63 6f 6d 70 69 6c 65 64 | 20 66 6f 72 20 45 6d 61 |compiled| for Ema|
|000001d0| 63 73 20 31 39 22 29 29 | 0a 0a 28 64 65 66 61 6c |cs 19"))|..(defal|
|000001e0| 69 61 73 20 27 72 69 6e | 67 2d 70 20 23 5b 28 78 |ias 'rin|g-p #[(x|
|000001f0| 29 20 22 08 3a 85 1d 00 | 08 40 a8 85 1d 00 08 41 |) ".:...|.@.....A|
|00000200| 3a 85 1d 00 08 41 40 a8 | 85 1d 00 c1 08 41 41 21 |:....A@.|.....AA!|
|00000210| 87 22 20 5b 78 20 76 65 | 63 74 6f 72 70 5d 20 32 |." [x ve|ctorp] 2|
|00000220| 20 22 5c 0a 52 65 74 75 | 72 6e 73 20 74 20 69 66 | "\.Retu|rns t if|
|00000230| 20 58 20 69 73 20 61 20 | 72 69 6e 67 3b 20 6e 69 | X is a |ring; ni|
|00000240| 6c 20 6f 74 68 65 72 77 | 69 73 65 2e 22 5d 29 0a |l otherw|ise."]).|
|00000250| 28 64 65 66 61 6c 69 61 | 73 20 27 6d 61 6b 65 2d |(defalia|s 'make-|
|00000260| 72 69 6e 67 20 23 5b 28 | 73 69 7a 65 29 20 22 c0 |ring #[(|size) ".|
|00000270| 89 c1 5c 6e c3 5c 22 42 | 42 87 22 20 5b 30 20 6d |..\n.\"B|B." [0 m|
|00000280| 61 6b 65 2d 76 65 63 74 | 6f 72 20 73 69 7a 65 20 |ake-vect|or size |
|00000290| 6e 69 6c 5d 20 35 20 22 | 5c 0a 4d 61 6b 65 20 61 |nil] 5 "|\.Make a|
|000002a0| 20 72 69 6e 67 20 74 68 | 61 74 20 63 61 6e 20 63 | ring th|at can c|
|000002b0| 6f 6e 74 61 69 6e 20 53 | 49 5a 45 20 65 6c 65 6d |ontain S|IZE elem|
|000002c0| 65 6e 74 73 2e 22 5d 29 | 0a 28 64 65 66 61 6c 69 |ents."])|.(defali|
|000002d0| 61 73 20 27 72 69 6e 67 | 2d 69 6e 73 65 72 74 2d |as 'ring|-insert-|
|000002e0| 61 74 2d 62 65 67 69 6e | 6e 69 6e 67 20 23 5b 28 |at-begin|ning #[(|
|000002f0| 72 69 6e 67 20 69 74 65 | 6d 29 20 22 08 41 41 89 |ring ite|m) ".AA.|
|00000300| 19 47 1a 08 40 1b 08 41 | 40 1c 5c 6e 5c 66 54 5e |.G..@..A|@.\n\fT^|
|00000310| 14 c5 0b 5c 6e 5c 22 13 | 09 0b 0e 06 49 88 08 0b |...\n\".|....I...|
|00000320| a0 88 08 41 5c 66 a0 2c | 87 22 20 5b 72 69 6e 67 |...A\f.,|." [ring|
|00000330| 20 76 65 63 20 76 65 63 | 6c 65 6e 20 68 64 20 6c | vec vec|len hd l|
|00000340| 6e 20 72 69 6e 67 2d 6d | 69 6e 75 73 31 20 69 74 |n ring-m|inus1 it|
|00000350| 65 6d 5d 20 34 20 22 5c | 0a 41 64 64 20 74 6f 20 |em] 4 "\|.Add to |
|00000360| 52 49 4e 47 20 74 68 65 | 20 69 74 65 6d 20 49 54 |RING the| item IT|
|00000370| 45 4d 2e 20 20 41 64 64 | 20 69 74 20 61 74 20 74 |EM. Add| it at t|
|00000380| 68 65 20 66 72 6f 6e 74 | 20 28 74 68 65 20 65 61 |he front| (the ea|
|00000390| 72 6c 79 20 65 6e 64 29 | 2e 22 5d 29 0a 28 64 65 |rly end)|."]).(de|
|000003a0| 66 61 6c 69 61 73 20 27 | 72 69 6e 67 2d 70 6c 75 |falias '|ring-plu|
|000003b0| 73 31 20 23 5b 28 69 6e | 64 65 78 20 76 65 63 6c |s1 #[(in|dex vecl|
|000003c0| 65 6e 29 20 22 08 c1 5c | 5c 89 1a 0b 55 83 0e 00 |en) "..\|\...U...|
|000003d0| c4 82 0f 00 5c 6e 29 87 | 22 20 5b 69 6e 64 65 78 |....\n).|" [index|
|000003e0| 20 31 20 6e 65 77 2d 69 | 6e 64 65 78 20 76 65 63 | 1 new-i|ndex vec|
|000003f0| 6c 65 6e 20 30 5d 20 33 | 20 22 5c 0a 49 4e 44 45 |len 0] 3| "\.INDE|
|00000400| 58 2b 31 2c 20 77 69 74 | 68 20 77 72 61 70 61 72 |X+1, wit|h wrapar|
|00000410| 6f 75 6e 64 22 5d 29 0a | 28 64 65 66 61 6c 69 61 |ound"]).|(defalia|
|00000420| 73 20 27 72 69 6e 67 2d | 6d 69 6e 75 73 31 20 23 |s 'ring-|minus1 #|
|00000430| 5b 28 69 6e 64 65 78 20 | 76 65 63 6c 65 6e 29 20 |[(index |veclen) |
|00000440| 22 08 c1 55 83 5c 6e 00 | 5c 6e 82 0b 00 08 c3 5a |"..U.\n.|\n.....Z|
|00000450| 87 22 20 5b 69 6e 64 65 | 78 20 30 20 76 65 63 6c |." [inde|x 0 vecl|
|00000460| 65 6e 20 31 5d 20 32 20 | 22 5c 0a 49 4e 44 45 58 |en 1] 2 |"\.INDEX|
|00000470| 2d 31 2c 20 77 69 74 68 | 20 77 72 61 70 61 72 6f |-1, with| wraparo|
|00000480| 75 6e 64 22 5d 29 0a 28 | 64 65 66 61 6c 69 61 73 |und"]).(|defalias|
|00000490| 20 27 72 69 6e 67 2d 6c | 65 6e 67 74 68 20 23 5b | 'ring-l|ength #[|
|000004a0| 28 72 69 6e 67 29 20 22 | 08 41 40 87 22 20 5b 72 |(ring) "|.A@." [r|
|000004b0| 69 6e 67 5d 20 31 20 22 | 5c 0a 4e 75 6d 62 65 72 |ing] 1 "|\.Number|
|000004c0| 20 6f 66 20 65 6c 65 6d | 65 6e 74 73 20 69 6e 20 | of elem|ents in |
|000004d0| 74 68 65 20 72 69 6e 67 | 2e 22 5d 29 0a 28 62 79 |the ring|."]).(by|
|000004e0| 74 65 2d 63 6f 64 65 20 | 22 c0 c1 c2 5c 22 88 c0 |te-code |"...\"..|
|000004f0| c3 c4 5c 22 87 22 20 5b | 64 65 66 61 6c 69 61 73 |..\"." [|defalias|
|00000500| 20 72 69 6e 67 2d 65 6d | 70 74 79 2d 70 20 23 5b | ring-em|pty-p #[|
|00000510| 28 72 69 6e 67 29 20 22 | 08 41 40 c1 55 87 22 20 |(ring) "|.A@.U." |
|00000520| 5b 72 69 6e 67 20 30 5d | 20 32 5d 20 72 69 6e 67 |[ring 0]| 2] ring|
|00000530| 2d 69 6e 64 65 78 20 23 | 5b 28 69 6e 64 65 78 20 |-index #|[(index |
|00000540| 68 65 61 64 20 72 69 6e | 67 6c 65 6e 20 76 65 63 |head rin|glen vec|
|00000550| 6c 65 6e 29 20 22 c0 09 | 5c 6e 5c 22 11 c0 0b 5c |len) "..|\n\"...\|
|00000560| 6e 09 5a 5c 5c 53 5c 66 | 5c 22 87 22 20 5b 6d 6f |n.Z\\S\f|\"." [mo|
|00000570| 64 20 69 6e 64 65 78 20 | 72 69 6e 67 6c 65 6e 20 |d index |ringlen |
|00000580| 68 65 61 64 20 76 65 63 | 6c 65 6e 5d 20 34 5d 5d |head vec|len] 4]]|
|00000590| 20 33 29 0a 28 64 65 66 | 61 6c 69 61 73 20 27 72 | 3).(def|alias 'r|
|000005a0| 69 6e 67 2d 69 6e 73 65 | 72 74 20 23 5b 28 72 69 |ing-inse|rt #[(ri|
|000005b0| 6e 67 20 69 74 65 6d 29 | 20 22 08 41 41 89 19 47 |ng item)| ".AA..G|
|000005c0| 1a 08 40 1b 08 41 40 1c | 09 c5 0b 5c 66 5c 5c 5c |..@..A@.|...\f\\\|
|000005d0| 6e 5c 22 0e 06 49 5c 66 | 5c 6e 55 83 28 00 08 c7 |n\"..I\f|\nU.(...|
|000005e0| 0b 5c 6e 5c 22 a0 88 82 | 2e 00 08 41 5c 66 54 a0 |.\n\"...|...A\fT.|
|000005f0| 88 2c 87 22 20 5b 72 69 | 6e 67 20 76 65 63 20 76 |.,." [ri|ng vec v|
|00000600| 65 63 6c 65 6e 20 68 64 | 20 6c 6e 20 6d 6f 64 20 |eclen hd| ln mod |
|00000610| 69 74 65 6d 20 72 69 6e | 67 2d 70 6c 75 73 31 5d |item rin|g-plus1]|
|00000620| 20 36 20 22 5c 0a 49 6e | 73 65 72 74 20 6f 6e 74 | 6 "\.In|sert ont|
|00000630| 6f 20 72 69 6e 67 20 52 | 49 4e 47 20 74 68 65 20 |o ring R|ING the |
|00000640| 69 74 65 6d 20 49 54 45 | 4d 2c 20 61 73 20 74 68 |item ITE|M, as th|
|00000650| 65 20 6e 65 77 65 73 74 | 20 28 6c 61 73 74 29 20 |e newest| (last) |
|00000660| 69 74 65 6d 2e 0a 49 66 | 20 74 68 65 20 72 69 6e |item..If| the rin|
|00000670| 67 20 69 73 20 66 75 6c | 6c 2c 20 64 75 6d 70 20 |g is ful|l, dump |
|00000680| 74 68 65 20 6f 6c 64 65 | 73 74 20 69 74 65 6d 20 |the olde|st item |
|00000690| 74 6f 20 6d 61 6b 65 20 | 72 6f 6f 6d 2e 22 5d 29 |to make |room."])|
|000006a0| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 72 69 6e 67 |.(defali|as 'ring|
|000006b0| 2d 72 65 6d 6f 76 65 20 | 23 5b 28 72 69 6e 67 20 |-remove |#[(ring |
|000006c0| 26 6f 70 74 69 6f 6e 61 | 6c 20 69 6e 64 65 78 29 |&optiona|l index)|
|000006d0| 20 22 c0 09 21 83 5c 6e | 00 c2 c3 21 87 09 40 1c | "..!.\n|...!..@.|
|000006e0| 09 41 40 1d 09 41 41 89 | 1e 06 47 1e 07 c8 5c 66 |.A@..AA.|..G...\f|
|000006f0| 0d 5c 5c 53 0e 07 5c 22 | 1e 09 ca 1e 0b 0e 5c 66 |.\\S..\"|......\f|
|00000700| 84 30 00 0d 53 16 5c 66 | cd 0e 5c 66 5c 66 0d 0e |.0..S.\f|..\f\f..|
|00000710| 07 24 16 5c 66 0e 06 0e | 5c 66 48 16 0b 0e 5c 66 |.$.\f...|\fH...\f|
|00000720| 0e 09 55 84 64 00 0e 06 | 0e 5c 66 0e 06 ce 0e 5c |..U.d...|.\f....\|
|00000730| 66 0e 07 5c 22 48 49 88 | ce 0e 5c 66 0e 07 5c 22 |f..\"HI.|..\f..\"|
|00000740| 89 16 5c 66 82 43 00 0e | 06 0e 09 ca 49 88 09 41 |..\f.C..|....I..A|
|00000750| 0d 53 a0 88 0e 0b 2e 06 | 87 22 20 5b 72 69 6e 67 |.S......|." [ring|
|00000760| 2d 65 6d 70 74 79 2d 70 | 20 72 69 6e 67 20 65 72 |-empty-p| ring er|
|00000770| 72 6f 72 20 22 52 69 6e | 67 20 65 6d 70 74 79 22 |ror "Rin|g empty"|
|00000780| 20 68 64 20 6c 6e 20 76 | 65 63 20 76 65 63 6c 65 | hd ln v|ec vecle|
|00000790| 6e 20 6d 6f 64 20 74 6c | 20 6e 69 6c 20 6f 6c 64 |n mod tl| nil old|
|000007a0| 65 6c 74 20 69 6e 64 65 | 78 20 72 69 6e 67 2d 69 |elt inde|x ring-i|
|000007b0| 6e 64 65 78 20 72 69 6e | 67 2d 70 6c 75 73 31 5d |ndex rin|g-plus1]|
|000007c0| 20 37 20 22 5c 0a 52 65 | 6d 6f 76 65 20 61 6e 20 | 7 "\.Re|move an |
|000007d0| 69 74 65 6d 20 66 72 6f | 6d 20 74 68 65 20 52 49 |item fro|m the RI|
|000007e0| 4e 47 2e 20 20 52 65 74 | 75 72 6e 20 74 68 65 20 |NG. Ret|urn the |
|000007f0| 72 65 6d 6f 76 65 64 20 | 69 74 65 6d 2e 0a 49 66 |removed |item..If|
|00000800| 20 6f 70 74 69 6f 6e 61 | 6c 20 49 4e 44 45 58 20 | optiona|l INDEX |
|00000810| 69 73 20 6e 69 6c 2c 20 | 72 65 6d 6f 76 65 20 74 |is nil, |remove t|
|00000820| 68 65 20 6f 6c 64 65 73 | 74 20 69 74 65 6d 2e 20 |he oldes|t item. |
|00000830| 20 49 66 20 69 74 27 73 | 0a 6e 75 6d 65 72 69 63 | If it's|.numeric|
|00000840| 2c 20 72 65 6d 6f 76 65 | 20 74 68 65 20 65 6c 65 |, remove| the ele|
|00000850| 6d 65 6e 74 20 69 6e 64 | 65 78 65 64 2e 22 5d 29 |ment ind|exed."])|
|00000860| 0a 28 64 65 66 61 6c 69 | 61 73 20 27 72 69 6e 67 |.(defali|as 'ring|
|00000870| 2d 72 65 66 20 23 5b 28 | 72 69 6e 67 20 69 6e 64 |-ref #[(|ring ind|
|00000880| 65 78 29 20 22 c0 09 21 | 83 5c 6e 00 c2 c3 21 87 |ex) "..!|.\n...!.|
|00000890| 09 40 1c 09 41 40 1d 09 | 41 41 89 1e 06 c7 0e 08 |.@..A@..|AA......|
|000008a0| 5c 66 0d 0e 06 47 24 48 | 2b 87 22 20 5b 72 69 6e |\f...G$H|+." [rin|
|000008b0| 67 2d 65 6d 70 74 79 2d | 70 20 72 69 6e 67 20 65 |g-empty-|p ring e|
|000008c0| 72 72 6f 72 20 22 69 6e | 64 65 78 65 64 20 65 6d |rror "in|dexed em|
|000008d0| 70 74 79 20 72 69 6e 67 | 22 20 68 64 20 6c 6e 20 |pty ring|" hd ln |
|000008e0| 76 65 63 20 72 69 6e 67 | 2d 69 6e 64 65 78 20 69 |vec ring|-index i|
|000008f0| 6e 64 65 78 5d 20 37 20 | 22 5c 0a 52 65 74 75 72 |ndex] 7 |"\.Retur|
|00000900| 6e 73 20 52 49 4e 47 27 | 73 20 49 4e 44 45 58 20 |ns RING'|s INDEX |
|00000910| 65 6c 65 6d 65 6e 74 2e | 0a 49 4e 44 45 58 20 6e |element.|.INDEX n|
|00000920| 65 65 64 20 6e 6f 74 20 | 62 65 20 3c 3d 20 74 68 |eed not |be <= th|
|00000930| 65 20 72 69 6e 67 20 6c | 65 6e 67 74 68 2c 20 74 |e ring l|ength, t|
|00000940| 68 65 20 61 70 70 72 6f | 70 72 69 61 74 65 20 6d |he appro|priate m|
|00000950| 6f 64 75 6c 6f 20 6f 70 | 65 72 61 74 69 6f 6e 0a |odulo op|eration.|
|00000960| 77 69 6c 6c 20 62 65 20 | 70 65 72 66 6f 72 6d 65 |will be |performe|
|00000970| 64 2e 20 20 45 6c 65 6d | 65 6e 74 20 30 20 69 73 |d. Elem|ent 0 is|
|00000980| 20 74 68 65 20 6d 6f 73 | 74 20 72 65 63 65 6e 74 | the mos|t recent|
|00000990| 6c 79 20 69 6e 73 65 72 | 74 65 64 3b 20 68 69 67 |ly inser|ted; hig|
|000009a0| 68 65 72 20 69 6e 64 69 | 63 65 73 0a 63 6f 72 72 |her indi|ces.corr|
|000009b0| 65 73 70 6f 6e 64 20 74 | 6f 20 6f 6c 64 65 72 20 |espond t|o older |
|000009c0| 65 6c 65 6d 65 6e 74 73 | 20 75 6e 74 69 6c 20 74 |elements| until t|
|000009d0| 68 65 79 20 77 72 61 70 | 2e 22 5d 29 0a 28 70 72 |hey wrap|."]).(pr|
|000009e0| 6f 76 69 64 65 20 28 71 | 75 6f 74 65 20 72 69 6e |ovide (q|uote rin|
|000009f0| 67 29 29 0a | |g)). | |
+--------+-------------------------+-------------------------+--------+--------+